package system
import(
	"os"
	"path/filepath"
	"os/user"
)
type Windows struct{
	OS
}
func (this *Windows) GetHomeFolder() string{
	return ""
}
func (this *Windows) Open(path string) (*os.File,os.Error){
	path,_=filepath.Abs(path)
	path=filepath.FromSlash(path)
	return os.Open(path)
}
func (this *Windows) GetUser() (*user.User,os.Error){
	var usr user.User
	usr.HomeDir=os.Getenv("USERPROFILE")
	usr.Name=os.Getenv("USERNAME")
	return &usr,nil
}
func (this *Windows) GetDriveList() string{
	list:=""
	d:=[]byte{65}
	for ;d[0]<=90;d[0]++{
		_,err:=os.Open(string(d)+":\\")
		if err==nil{
			list+=string(d)+":\\;"
		}
	}
	if len(list)==0{return ""}
	list=list[:len(list)-1]
	return list
}
